package com.hongxun.design.bean;

import com.hongxun.design.MyApp;
import com.hongxun.design.utils.soundUtil.UPlayer;

/**
 * Created by zerdoor_pc on 2016/7/1.
 */
public class LogProjectItemBean {


    public int num;
    public String log_id = "";
    public String user = "";
    public String voice_remark = "";
    public String characters_remark = "";
    public String create_time = "";
    public String stage_name;
    public String project_statis;
    public double length;

    public LogProjectItemBean(int num, LogBean l, LogProjectBean p) {
        this.num = num;
        this.log_id = l.getLog_id();
        this.user = l.getUser();

        this.voice_remark = l.getVoice_remark();
        if (voice_remark!=null&&voice_remark.length()>0){
            String[] tar=voice_remark.split("/");
            String name="";
            if (tar!=null&&tar.length>1){
                name=tar[tar.length-1];
            } else{
                name=System.currentTimeMillis()+".amr";
            }
            String path= MyApp.File.getCachaVoicePath()+name;
//            String path= MyApp.File.getCachaVoicePath();
            String sourse=voice_remark;
            if (sourse!=null&&sourse.length()>0&&MyApp.isOnLine) path=MyApp.getHttpVoice(sourse,path);
                setVoice_remark(path);


        }



        this.characters_remark = l.getCharacters_remark();
        this.create_time = l.getCreate_time();


        if (p != null) {
            this.stage_name = p.getStage_name();
            this.project_statis = p.getProject_statis();
        }
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getLog_id() {
        return log_id;
    }

    public void setLog_id(String log_id) {
        this.log_id = log_id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getVoice_remark() {
        return voice_remark;
    }

    public void setVoice_remark(String voice_remark) {
        this.voice_remark = voice_remark;
    }

    public String getCharacters_remark() {
        return characters_remark;
    }

    public void setCharacters_remark(String characters_remark) {
        this.characters_remark = characters_remark;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getStage_name() {
        return stage_name;
    }

    public void setStage_name(String stage_name) {
        this.stage_name = stage_name;
    }

    public String getProject_statis() {
        return project_statis;
    }

    public void setProject_statis(String project_statis) {
        this.project_statis = project_statis;
    }
}
